import request from '@/http';

// 用户登录
export const loginAPI = (data: { account: string, password: string }) => {
  return request.post('/api/login/login', data);
};

// 用户注册
export const registerAPI = (data: { account: string, password: string }) => {
  return request.post('/api/login/register', data);
};

export const sendVerificationCodeAPI = (data: { account: string; email: string }) => {
  return request.post('/send-code', data); // 移除/api前缀
};

export const verifyCodeAPI = (data: { account: string; code: string }) => { // 移除email参数
  return request.post('/verify-code', data); // 移除/api前缀
};

export const resetPasswordAPI = (data: { account: string; code: string; password: string }) => { // 添加code参数
  return request.post('/reset-password', data); // 移除/api前缀
};